<template>
  <div class="child">
    <h2>我是child组件</h2>
    {{sum}}
  </div>
</template>

<script>
import {ref} from 'vue'
export default {
  name: 'Child',
  async setup(){
    let sum = ref(0)
    return await new Promise((reslove, reject) => {
        setTimeout(() => {
            reslove({sum})
        },3000)
    })
  },
}
</script>

<style>
.child{
  background-color: yellowgreen;
  padding: 10px;
}
</style>
